import { fetchWrapper } from './common';


/**
 * WmsIndicatorResult
 */
export interface WmsIndicatorResult {
    /**
     * 年度出库量
     */
    annualOutboundQuantity?: number;
    customerQuantity?: number;
    /**
     * 年度入库量
     */
    annualReceiptQuantity?: number;
    /**
     * 出运量大屏数据
     */
    blockData?: MapListWmsWarehouseCustomerDataVO;
    /**
     * 去化率大屏数据
     */
    blockUsageData?: MapObject;
    /**
     * 客户出入库货量
     */
    customerStoreDataList?: CustomerStoreData[];
    /**
     * 月度出库量
     */
    monthlyOutboundQuantity?: number;
    /**
     * 月度入库量
     */
    monthlyReceiptQuantity?: number;
    /**
     * 当日出库量
     */
    outboundQuantity?: number;
    /**
     * 12个月出入库货量趋势
     */
    storeDataList?: StoreData[];
    /**
     * 当日实际入库量
     */
    storeQuantity?: number;
    /**
     * 当日入库预约量
     */
    storeReservationQuantity?: number;
    /**
     * 去化率趋势
     */
    usageDataList?: UsageData[];
    /**
     * 去化率
     */
    usageRate?: number;
    /**
     * 当日仓库作业量
     */
    workDataList?: WorkData[];
}

/**
 * 出运量大屏数据
 *
 * MapListWmsWarehouseCustomerDataVO
 */
export interface MapListWmsWarehouseCustomerDataVO {
    key?: Key[];
}

/**
 * key
 */
export interface Key {
    customerName?: string;
    layer?: MapObject[];
    monthContainer?: number;
    monthPermeability?: number;
    monthPoolShipment?: number;
    monthProportion?: number;
    monthSelfShipment?: number;
    monthTarget?: number;
    monthTrailer?: number;
    shipment?: number;
    usableArea?: string;
}

/**
 * MapObject
 *
 * 去化率大屏数据
 */
export interface MapObject {
    key?: { [key: string]: any };
}

/**
 * com.zjyg.screen.vo.WmsIndicatorResult.CustomerStoreData
 *
 * CustomerStoreData
 */
export interface CustomerStoreData {
    allNum?: number;
    customerName?: string;
    outNum?: number;
    storeNum?: number;
}

/**
 * com.zjyg.screen.vo.WmsIndicatorResult.StoreData
 *
 * StoreData
 */
export interface StoreData {
    outNum?: number;
    storeNum?: number;
    time?: string;
}

/**
 * com.zjyg.screen.vo.WmsIndicatorResult.UsageData
 *
 * UsageData
 */
export interface UsageData {
    num?: number;
    time?: string;
}

/**
 * com.zjyg.screen.vo.WmsIndicatorResult.WorkData
 *
 * WorkData
 */
export interface WorkData {
    block?: string;
    customerName?: string;
    teu?: number;
    operation?: string;
}


/**
 * 义东北仓数据
 * @returns 
 */
export const getWarehouseInfo = () => {
	return fetchWrapper<WmsIndicatorResult>(
		`/big-screen/wmsIndicator/getInfo`
	);
};
  